﻿using System.Xml;

namespace QDT.Payment.AllInPay.Api
{
    /// <summary>
    /// 单条交易记录交易状态类
    /// </summary>
    public class RetDetailResponse : DetailPackage
    {
        private string
            m_strSn, // SN
            m_strRetCode, //RET_CODE
            m_strErrMsg; // ERR_MSG

        /// <summary>
        /// 根据XML节点生成单条交易记录交易状态对象
        /// </summary>
        /// <param name="root">状态XML节点</param>
        public RetDetailResponse(XmlNode root)
        {
            this.root = root;
            Sn = GetText("./SN/node()");
            RetCode = GetText("./RET_CODE/node()");
            ErrMsg = GetText("./ERR_MSG/node()");
        }

        /// <summary>
        /// 文件内记录号
        /// </summary>
        public string Sn
        {
            get { return m_strSn; }
            set { m_strSn = value; }
        }
        /// <summary>
        /// 返回码
        /// </summary>
        public string RetCode
        {
            get { return m_strRetCode; }
            set { m_strRetCode = value; }
        }
        /// <summary>
        /// 错误文本
        /// </summary>
        public string ErrMsg
        {
            get { return m_strErrMsg; }
            set { m_strErrMsg = value; }
        }
    }
}
